import request from "@/utils/request";

// 广告商家发布
export const advertisementMerchantApiPublish = (data) => {
  return request({
    url: `/backAdmin/advertisementMerchantApi/publish`,
    method: "post",
    data,
  });
};


// 广告商家审核详情
export const advertisementMerchantApiapplydetail = (advertisementMerchantId) => {
  return request({
    url: `/backAdmin/advertisementMerchantApi/apply/detail?advertisementMerchantId=${advertisementMerchantId}`,
    method: "get",
  });
};

// 广告商家审核(true通过 false拒绝)
export const advertisementMerchantApiApplyHandle = ({
  advertisementMerchantId,
  handle,
}) => {
  return request({
    url: `/backAdmin/advertisementMerchantApi/apply/handle?handle=${handle}&advertisementMerchantId=${advertisementMerchantId}`,
    method: "post",
  });
};


// 广告商家监管详情
export const advertisementMerchantApisupervisedetail = (advertisementMerchantId) => {
  return request({
    url: `/backAdmin/advertisementMerchantApi/supervise/detail?advertisementMerchantId=${advertisementMerchantId}`,
    method: "get",
  });
};
// 广告商家监管列表
export const advertisementMerchantApisuperviselist = (query) => {
  return request({
    url: `/backAdmin/advertisementMerchantApi/supervise/list`,
    method: "get",
    params: query,
  });
};

// 广告商家审核列表
export const charApplyList = (query) => {
  return request({
    url: `/backAdmin/advertisementApi/char/apply/list`,
    method: "get",
    params: query,
  });
};

// 广告字幕审核列表
export const advertisementMerchantApiApplyList = (query) => {
  return request({
    url: `/backAdmin/advertisementMerchantApi/apply/list`,
    method: "get",
    params: query,
  });
};

// 广告商品列表
export function listNotice(query) {
  return request({
    url: "/backAdmin/advertisementMerchantApi/list",
    method: "get",
    params: query,
  });
}

// 删除广告
export function delNotice(advertisementMerchantIdList) {
  return request({
    url: `/backAdmin/advertisementMerchantApi/delete?advertisementMerchantIdList=${advertisementMerchantIdList}`,
    method: "post",
  });
}

// 查询公告详细
export function getNotice(noticeId) {
  return request({
    url: "/system/notice/" + noticeId,
    method: "get",
  });
}

// 新增公告
export function addNotice(data) {
  return request({
    url: "/system/notice",
    method: "post",
    data: data,
  });
}

// 修改公告
export function updateNotice(data) {
  return request({
    url: "/system/notice",
    method: "put",
    data: data,
  });
}
